#include <iostream>

// 声明各个特性的演示函数
void demonstrate_concepts();
void demonstrate_ranges();
void demonstrate_coroutines();
void demonstrate_modules();
void demonstrate_format();
void demonstrate_span();
void demonstrate_three_way_comparison();
void demonstrate_designated_initializers();
void demonstrate_constexpr_containers();
void demonstrate_jthread();
namespace cpp20 {
void demonstrate_consteval_constinit();
} // namespace cpp20

namespace cpp20 {

void demonstrate_features() {
    std::cout << "1. 概念(Concepts):\n";
    demonstrate_concepts();
    std::cout << "\n";

    std::cout << "2. 范围库(Ranges):\n";
    demonstrate_ranges();
    std::cout << "\n";

    std::cout << "3. 协程(Coroutines):\n";
    demonstrate_coroutines();
    std::cout << "\n";

    std::cout << "4. 模块(Modules):\n";
    demonstrate_modules();
    std::cout << "\n";

    std::cout << "5. 格式化库(std::format):\n";
    demonstrate_format();
    std::cout << "\n";

    std::cout << "6. 跨度(std::span):\n";
    demonstrate_span();
    std::cout << "\n";

    std::cout << "7. 三路比较(Spaceship Operator):\n";
    demonstrate_three_way_comparison();
    std::cout << "\n";

    std::cout << "8. 指定初始化器(Designated Initializers):\n";
    demonstrate_designated_initializers();
    std::cout << "\n";
    
    std::cout << "9. 编译期容器(Constexpr Containers):\n";
    demonstrate_constexpr_containers();
    std::cout << "\n";
    
    std::cout << "10. 可联接线程(std::jthread):\n";
    demonstrate_jthread();
    std::cout << "\n";
    
    std::cout << "11. consteval和constinit关键字:\n";
    cpp20::demonstrate_consteval_constinit();
    std::cout << "\n";
}

} // namespace cpp20

